<?php
namespace app\app\controller\soft;
use app\app\Appbase;
use base\map\AmapApi;

class Map extends Appbase 
{
	
	/**
    * 根据经纬度获取地址
    * /app/soft/map/getAddress 
    * @return  array
	 * @is_need_login true
    */
	public function getAddress($lat='',$lng=''){
		if( !trim($lat) || !trim($lng) ){
			return $this->ReError("参数错误！");
		}
		try {
			$res = AmapApi::getAddress($lat,$lng);
			if(!$res){
				return $this->ReError( $msgapi->errorInfo ); 
			}
			return $this->ReSucess($res);	
		} catch (\Exception $e) {
			return $this->ReError($e->getMessage());	
		}
	}
	
   
}